package com.mycase.im.boot.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.mycase.im.boot.entity.database.ImUser;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * @Author ZhuHJay
 * @Date 2021/8/2 17:06
 */
public interface UserMapper extends BaseMapper<ImUser> {

    /**
     * 用来获取用户的个人信息, 不包括密码信息
     * @param id 用户的id
     * @return 用户信息
     */
    @Select("select id, account, nike_name, sign, avatar, email, create_time, status from im_user where id = #{id}")
    ImUser findById(@Param("id") String id);

}
